import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/ruoyi";


//获取活动了列表
export function listVolunteer(query) {
  return request({
    url: '/volunteer/list',
    method: 'get',
    params: query
  })
}

// 获取活动详细信息
export function getVolunteer(activityId) {
  return request({
    url: '/volunteer/get/' + praseStrEmpty(activityId),
    method: 'get'
  })
}

//添加活动
export function addVolunteer(data) {
  return request({
    url: '/volunteer/add',
    method: 'post',
    data: data
  })
}

//修改活动内容
export function updateVolunteer(data) {
  return request({
    url: '/volunteer/update',
    method: 'post',
    data: data
  })
}

// 删除活动
export function delVolunteer(activityId) {
  return request({
    url: '/volunteer/remove/' + activityId,
    method: 'post'
  })
}
